﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiModelToViewProc : OdRxObject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiModelToViewProc(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiModelToViewProc_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiModelToViewProc obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiModelToViewProc()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiModelToViewProc(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdGiModelToViewProc cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiModelToViewProc_cast(OdRxObject.getCPtr(pObj));
			OdGiModelToViewProc result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiModelToViewProc)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiModelToViewProc)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiModelToViewProc)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiModelToViewProc_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiModelToViewProc_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiModelToViewProc_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGiModelToViewProc createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiModelToViewProc_createObject();
			OdGiModelToViewProc result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiModelToViewProc)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiModelToViewProc)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiModelToViewProc)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setDrawContext(OdGiConveyorContext pDrawCtx)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_setDrawContext(this.swigCPtr, pDrawCtx.GetCPtr());
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiConveyorInput modelInput()
		{
			OdGiConveyorInput_Internal result = new OdGiConveyorInput_Internal(GlobalsPINVOKE.OdGiModelToViewProc_modelInput(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiConveyorInput eyeInput()
		{
			OdGiConveyorInput_Internal result = new OdGiConveyorInput_Internal(GlobalsPINVOKE.OdGiModelToViewProc_eyeInput(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiConveyorOutput output()
		{
			OdGiConveyorOutput_Internal result = new OdGiConveyorOutput_Internal(GlobalsPINVOKE.OdGiModelToViewProc_output(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setEyeToOutputTransform(OdGeMatrix3d xMat)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_setEyeToOutputTransform(this.swigCPtr, OdGeMatrix3d.getCPtr(xMat));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGeMatrix3d eyeToOutputTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_eyeToOutputTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setView(OdGePoint3d target, OdGeVector3d xVector, OdGeVector3d upVector, OdGeVector3d eyeVector)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_setView(this.swigCPtr, OdGePoint3d.getCPtr(target), OdGeVector3d.getCPtr(xVector), OdGeVector3d.getCPtr(upVector), OdGeVector3d.getCPtr(eyeVector));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setWorldToEyeTransform(OdGeMatrix3d xMat)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_setWorldToEyeTransform(this.swigCPtr, OdGeMatrix3d.getCPtr(xMat));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGeMatrix3d worldToEyeTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_worldToEyeTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGeMatrix3d eyeToWorldTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_eyeToWorldTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGeMatrix3d modelToEyeTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_modelToEyeTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGeMatrix3d eyeToModelTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_eyeToModelTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void pushModelTransform(OdGeMatrix3d xMat)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_pushModelTransform(this.swigCPtr, OdGeMatrix3d.getCPtr(xMat));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void popModelTransform()
		{
			GlobalsPINVOKE.OdGiModelToViewProc_popModelTransform(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGeMatrix3d modelToWorldTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_modelToWorldTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGeMatrix3d worldToModelTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGiModelToViewProc_worldToModelTransform(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiXform getModelToEyeXform()
		{
			OdGiXform result = (OdGiXform)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiModelToViewProc_getModelToEyeXform__SWIG_0(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiXform getEyeToModelXform()
		{
			OdGiXform result = (OdGiXform)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiModelToViewProc_getEyeToModelXform__SWIG_0(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void pushClipBoundary(OdGiClipBoundary pBoundary)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_pushClipBoundary__SWIG_0(this.swigCPtr, OdGiClipBoundary.getCPtr(pBoundary));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void pushClipBoundary(OdGiClipBoundary pBoundary, OdGiAbstractClipBoundary pClipInfo)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_pushClipBoundary__SWIG_1(this.swigCPtr, OdGiClipBoundary.getCPtr(pBoundary), OdGiAbstractClipBoundary.getCPtr(pClipInfo));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void popClipBoundary()
		{
			GlobalsPINVOKE.OdGiModelToViewProc_popClipBoundary(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool isClipping()
		{
			bool result = GlobalsPINVOKE.OdGiModelToViewProc_isClipping(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool isEmptyClipSet()
		{
			bool result = GlobalsPINVOKE.OdGiModelToViewProc_isEmptyClipSet(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWorldDeviation(OdGiDeviation worldDev)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_setWorldDeviation__SWIG_0(this.swigCPtr, worldDev.GetCPtr());
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void setWorldDeviation(OdGeDoubleArray deviations)
		{
			GlobalsPINVOKE.OdGiModelToViewProc_setWorldDeviation__SWIG_1(this.swigCPtr, OdGeDoubleArray.getCPtr(deviations));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiDeviation worldDeviation()
		{
			OdGiDeviation_Internal result = new OdGiDeviation_Internal(GlobalsPINVOKE.OdGiModelToViewProc_worldDeviation(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDeviation modelDeviation()
		{
			OdGiDeviation_Internal result = new OdGiDeviation_Internal(GlobalsPINVOKE.OdGiModelToViewProc_modelDeviation(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGiDeviation eyeDeviation()
		{
			OdGiDeviation_Internal result = new OdGiDeviation_Internal(GlobalsPINVOKE.OdGiModelToViewProc_eyeDeviation(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
